3 * A special page that displays a list of pages that are not on anyones watchlist
6 * @subpackage SpecialPage
8 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
9 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
13 require_once 'QueryPage.php';
17 * @subpackage SpecialPage
19 class UnwatchedpagesPage
extends QueryPage
{
21 function getName() { return 'Unwatchedpages'; }
22 function isExpensive() { return true; }
23 function isSyndicated() { return false; }
26 $dbr =& wfGetDB( DB_SLAVE
);
27 extract( $dbr->tableNames( 'page', 'watchlist' ) );
31 'Unwatchedpages' as type,
32 page_namespace as namespace,
34 page_namespace as value
36 LEFT JOIN $watchlist ON wl_namespace = page_namespace AND page_title = wl_title
37 WHERE wl_title IS NULL
41 function sortDescending() { return false; }
43 function formatResult( $skin, $result ) {
46 $nt = Title
::makeTitle( $result->namespace, $result->title
);
47 $text = $wgContLang->convert( $nt->getPrefixedText() );
49 $plink = $skin->makeKnownLink( $nt->getPrefixedText(), htmlspecialchars( $text ) );
58 function wfSpecialUnwatchedpages() {
59 list( $limit, $offset ) = wfCheckLimits();
61 $wpp = new UnwatchedpagesPage();
63 $wpp->doQuery( $offset, $limit );